import i18n from '@I18N'
import DBConfig from '@CONFIG/DBConfig'

export const GENDER_ENUM = ['Male', 'Female']
export const DEFAULT_TAKE = 10
export const ONE_DAY = 86400000

export const GENDER_OPTIONS = [{
  key: 'Male',
  label: i18n.patient.male()
}, {
  key: 'Female',
  label: i18n.patient.female()
}]
export const GENDER_TYPE = {
  Male: '男',
  Female: '女'
}

export const BELL_ALERT_STATUS = {
  NEW: 'New',
  VIEWED: 'Viewed'
}

export const PHONE_NUMBER_LENGTH = 11

export const ID_CARD_NUMBER_ARRAY = [15, 18]

export enum PATIENT_TYPE {
  CONSULATION= 'Consultation',
  FOLLOWUP= 'FollowUp'
}
export const CONSULTATION_TYPE = {
  PICTURE_TEXT: 'PictureText',
  PHONE: 'Phone',
  AUDIO: 'Audio',
  VIDEO: 'Video'
}

export const NOTIFICATION_TYPE_NAME = {
  REJECT_PATIENT: 'RejectPatient',
  ACCEPT_PATIENT: 'AcceptPatient',
  NEW_CARE_CHAT_MESSAGEN: 'NewCareChatMessage',
  SAVE_DOCTOR_ADVICE: 'SaveDoctorAdvice',
  ACCEPT_CONSULTATION: 'AcceptConsultation',
  DOCTOR_FOLLOWUP_REPLY: 'DoctorFollowUpReply',
  REJECT_CONSULTATION: 'RejectConsultation',
  REPLY_CONSULTATION: 'FirstDoctorReply',
  USER_REGISTER: 'UserRegister',
  SURVEY_ADVICE_ADDED: 'SurveyAdviceAdded',
  MANAGEMENT_PLAN_ADDED: 'ManagementPlanAdded',
  CLOSE_CONSULTATION: 'CloseConsultation',
  APPOINTMENT_REMINDER: 'AppointmentReminder',
  PAIN_MANAGEMENT_REMINDER: 'PainManagementReminder',
  MED_RECORD: 'MedRecord',
  CONSULTATION_REPORT: 'ConsultationReport',
  FollowUpMedRecordReminder: 'FollowUpMedRecordReminder'
}
export const ENTITY_TYPE = {
  ORDER: 'Order',
  PHONE_CONSULTATION: 'PhoneConsultation',
  CHAT: 'Chat'
}
export const SUBSCRIBES_EVENT = {
  CONSULTATION_SUBSCRIBES: [
    NOTIFICATION_TYPE_NAME.ACCEPT_CONSULTATION,
    NOTIFICATION_TYPE_NAME.REJECT_CONSULTATION
  ],
  DOCTOR_FOLLOWUP_REPLY: [
    NOTIFICATION_TYPE_NAME.DOCTOR_FOLLOWUP_REPLY
  ],
}
export const AVATAR_SUFFIX = '.jpg'

export const SESSION_TYPE = {
  FollowUp: 'FollowUp',
  Consultation: 'Consultation'
}

export const COMMENT_TYPE = {
  Doctor: 'Doctor',
  Consultation: 'Consultation'
}
export const DOCTOR_SERVER_CARD = {
  CONSULTATION: 'Consultation'
}
export const PAY_STATUS = {
  SUCCESS: 'requestPayment:ok',
  CANCEL: 'requestPayment:fail cancel',
  FAILED: 'requestPayment:fail'
}
export const PAYMENT_STATUS = {
  SUCCESS: 0,
  CANCEL: 1,
  FAILED: 2
}
export const WE_CHAT_PAY_STATUS = {
  SUCCESS: 'get_brand_wcpay_request:ok',
  CANCEL: 'get_brand_wcpay_request:cancel',
  FAILED: 'get_brand_wcpay_request:fail'
}
export const PAY_METHOD = {
  WECHAT_H5: 'WeChatH5',
  WECHAT_JSAPI: 'WeChatJSAPI',
  WMP_PAY: 'WmpPay',
  WECHAT_NATIVE: 'WeChatNative',
  MOCK_PAYMENT: 'MockPayment'
}
export const TRADE_STATE = {
  SUCCESS: 'SUCCESS',
  NOTPAY: 'NOTPAY'
}

export const PAY_CACHE_DIALOG_KEY = {
  ORDER_LIST_KEY: 'order_list_h5_dialog_data',
  PAYMENT_RESULT_KEY: 'payment_result_h5_dialog_data',
  PAYMENT_KEY: 'payment_h5_dialog_data',
  ORDER_DETAIL_KEY: 'order_detail_h5_dialog_data',
  SERVICE_PACK_KEY: 'service_pack_h5_dialog_data',
  SERVICE_PACK_ORDER_KEY: 'SERVICE_PACK_ORDER_KEY',
  PLAN_ORDER_KEY: 'plan_order_detail_h5_dialog_data'
}

export const FEATURED = {
  HotSearch: 'HotSearch',
  PopularSearch: 'PopularSearch'
}

export const ACTIVITY_TYPE = {
  PATIENT_REGISTER_BY_CODE: 'PatientRegisterByCode',
  DIAGNOSIS: 'Diagnosis'
}

export const FILTER_TYPE = {
  Address: 'Address',
  Position: 'Position',
  Price: 'Price',
  Service: 'Service'
}

export const SERVICE_TYPE = {
  PictureText: '图文咨询',
  Phone: '电话咨询'
}

export const POSITION_TYPE = {
  CheifPhysician: 'CheifPhysician',
  DeputyCheifPhysician: 'DeputyCheifPhysician',
  AttendingPhysician: 'AttendingPhysician',
  ResidentPhysician: 'ResidentPhysician'
}

export const POSITION_LEVEL = {
  CheifPhysician: '主任医师',
  DeputyCheifPhysician: '副主任医师',
  AttendingPhysician: '主治医师',
  ResidentPhysician: '住院医师'
}

export const PRICE_TYPE = {
  Level1: 'Level1',
  Level2: 'Level2',
  Level3: 'Level3',
  Level4: 'Level4'
}

export const PRICE_LEVEL_DATA = {
  Level1: [0, 30],
  Level2: [31, 50],
  Level3: [51, 100],
  Level4: [101, undefined]
}

export const PRICE_LEVEL = {
  Level1: '0-30元',
  Level2: '31-50元',
  Level3: '51-100元',
  Level4: '100元以上'
}

export const NumberText = [
  '一',
  '二',
  '三',
  '四',
  '五',
  '六',
  '七',
  '八'
]

export enum PAIN_MANAGEMENT_ACTION {
  Start = 'Start',
  Enter = 'Enter',
  ToConfirm = 'ToConfirm',
  None = 'None',
}

export enum ENTITY_TYPE_ENUM {
  Survey = 'Survey',
  DecisionFlow = 'DecisionFlow',
  FeedItem = 'FeedItem',
  Course = 'Course',
  Meditation = 'Meditation',
  PainLog = 'PainLog',
}

export enum STORAGE_KEY {
  home_pop_up_key = 'home_pop_up_key',
  plan_com_modal_key = 'plan_com_modal_key',
  data_center_modal_key = 'data_center_modal_key',
  meditation_play_data = 'meditation_play_data',
  meditation_white_noise = 'meditation_white_noise',
  meditation_is_today = 'meditation_is_today',
  showLogGuideModal = 'showLogGuideModal',
  planVideoStorage = 'plan_video_storage',
  showStepModal = 'showStepModal'
}

export enum MEDIA_TYPE_ENUM {
  Video = 'Video'
}

export const STORE_ROUTER_DATA = {
  path: `packages/home/dashboard/index?envVersion=release&wxAppId=${DBConfig.storeAppId}`,
  h5path: 'https://shop92103447.youzan.com/v2/feature/65uWZ92oZT'
}

export enum SPOT_CODE_ENUM {
  RecommendGoods = 'RecommendGoods',
  HomePersona = 'HomePersona',
  HomePageSpot = 'HomePageSpot',
  PainManagementDescription = 'PainManagementDescription',
}

export enum FILE_TYPE_ENUM {
  'jpg' = 'jpg',
  'png' = 'png',
  'gif' = 'gif',
  'bmp' = 'bmp',
  'webp' = 'webp',
  'jpeg' = 'jpeg',
}

